A broadcast address is a network address used to transmit to all devices connected to a multiple-access communications network. A message sent to a broadcast address may be received by all network-attached hosts.
In contrast, a multicast address is used to address a specific group of devices, and a unicast address is used to address a single device.
For network layer communications, a broadcast address may be a specific IP address. At the data link layer on Ethernet networks, it is a specific MAC address.
The directed broadcast address for any IPv4 host can be obtained by taking the bit complement (bitwise NOT) of the subnet mask and then performing a bitwise OR operation with the host's IP address. A shortcut to this process (for common masks using only 0 and 1 bit placements) is to simply take the host's IP address and set all bits in the host identifier portion of the address (any bit positions which hold a 0 in the subnet mask) to 1.
As shown in the example below, in order to calculate the directed broadcast address to transmit a packet to an entire IPv4 subnet using the private IP address space , which has the subnet mask , the broadcast address is calculated as bitwise ORed with = . Directed broadcasts always work within a subnet but, for security reasons, many routers disable the forwarding of these by default.
| +Broadcast address derivation example ! Network IP address breakdown for !! Binary form !! Dot-decimal notation | ||
| In bold below is shown the host part (suffix) of the IP address, with the network address prefix being the non-bold bits to its left. To obtain the broadcast address, the host bits get set to all 1's, while the network address prefix bits remain intact. | ||
| 1. Network IP address | 10101100.0001'''0000.00000000.00000000''' | 172.16.0.0 |
| 2. Subnet mask (The /12 in the IP address in this case means only the left-most 12 bits are 1s, as shown here. This reserves the left 12 bits for the network address (prefix) and the right 32 - 12 = 20 bits for the host address (suffix).) | 11111111.1111'''0000.00000000.00000000''' | 255.240.0.0 |
| 3. Bit complement (bitwise NOT) of the subnet mask | 00000000.0000'''1111.11111111.11111111''' | 0.15.255.255 |
| 4. Broadcast address (bitwise OR of 1. Network IP address and 3. Bit complement of the subnet mask. This makes the broadcast address the largest possible IP address (and host address, since the host address portion is all 1s) for any given network address.) | 10101100.0001'''1111.11111111.11111111''' | 172.31.255.255 |
A special definition exists for the IP address . It is the broadcast address of the zero network or , which in Internet Protocol standards stands for this network, i.e. the local network. Transmission to this address is limited by definition, in that it is never forwarded by the routers connecting the local network to other networks.
IP broadcasts are used by BOOTP and DHCP clients to find and send requests to their respective servers.
Internet Protocol version 6 (IPv6) does not implement this method of broadcast, and therefore does not define broadcast addresses. Instead, IPv6 uses IP multicast addressing to the all-hosts multicast group. No IPv6 protocols are defined to use the all-hosts address, though; instead, they send and receive on particular link-local multicast addresses. This results in higher efficiency because network hosts can filter traffic based on multicast address and do not need to process all broadcasts or all-hosts multicasts.
Ethernet broadcasts are used, among other purposes, by Address Resolution Protocol to resolve IP addresses to MAC addresses.
|
|